<template>
  <div class="fuchao" v-for="(item, index) in zhuan" :key="item._id">
    <div class="bot" v-if="index % 2 == 0">金牌推荐</div>
    <!-- 照片 -->
    <div class="left">
      <img :src="item.imgurl" alt="" />
    </div>
    <!-- 右侧详情 -->
    <div class="right">
      <div class="top">
        <div class="name">
          <div class="shang">
            <div class="sh">
              <div class="le">{{ item.name }}</div>
              <div class="ri">{{ item.Indications }}</div>
            </div>
          </div>
          <div class="xia">
            <span class="span1">
              {{ item.belongto }}
            </span>
          </div>
        </div>
        <!-- 擅长 -->
        <div class="jieshao">擅长:{{ item.information }}</div>
        <!-- 咨询 -->
        <div class="zx">
          <div class="l1">
            <span>回复</span>
            <span class="span2">{{ item.replay }}</span>
          </div>
          <div class="l2">
            <span class="span1">咨询</span>
            <span class="span2">{{ item.service }}</span>
          </div>
          <div class="l3">
            <span>好评</span>
            <span class="span2">{{ item.Praise }}</span>
          </div>
        </div>
        <div class="price">
          <div class="le">
            <span class="span1">{{ item.newprice }}</span>
            <span class="span2">{{ item.oldprice }}</span>
          </div>
          <div class="ri">立即咨询</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { inject } from "vue";
// import { getRecommendApi } from "../../utils/api";
export default {
  setup() {
    const zhuan = inject("zhuanjia");
    return {
      zhuan,
    };
  },
};
</script>
<style lang="less" scoped>
.fuchao {
  position: relative;
  border-top: 1px solid #e9dcdc;
  padding: 15px 10px;
  width: 100%;
  display: flex;
  .bot {
    position: absolute;
    top: 0;
    right: 0;
    // width: 55px;
    padding: 0 10px;
    height: 25px;
    background: #feda81;
    border-radius: 0px 0px 0px 12px;
    font-size: 10px;
    font-weight: 500;
    color: #926514;
    line-height: 25px;
    text-align: center;
  }
  .left {
    width: 54px;
    height: 54px;
    margin-right: 15px;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }
  .right {
    flex: 1;
    .name {
      margin-top: 5px;
      height: 37px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .shang {
        // width: 140px;
        display: flex;
        justify-content: space-between;
        .sh {
          display: flex;
          .le {
            // width: 56px;
            margin-right: 8px;
            height: 17px;
            font-size: 18px;
            font-weight: bold;
            color: #333333;
            line-height: 18px;
          }
          .ri {
            // width: 70px;
            opacity: 0.9;
            height: 13px;
            font-size: 12px;
            font-weight: 450;
            color: #333333;
            line-height: 18px;
          }
        }
      }
      .xia {
        display: flex;
        opacity: 0.9;
        height: 14px;
        .span1 {
          height: 11px;
          font-size: 12px;
          font-weight: 500;
          color: #333333;
          line-height: 18px;
        }
      }
    }
    .jieshao {
      margin-top: 11px;
      width: 282px;
      height: 36px;
      font-size: 13px;
      font-weight: 500;
      color: #999999;
      line-height: 20px;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }
  }
  .zx {
    opacity: 0.8;
    font-size: 12px;
    font-weight: 500;
    color: #333333;
    margin: 10px 0 6px 0;
    display: flex;
    .span2 {
      color: #f79c10;
      margin-left: 3px;
    }
    .l2 {
      margin: 0 17px;
    }
  }
  .price {
    display: flex;
    justify-content: space-between;
    .le {
      span {
        display: inline-block;
      }
      .span1 {
        height: 11px;
        margin-right: 6px;
        font-size: 16px;
        font-weight: 500;
        color: #ff4562;
        line-height: 18px;
      }
      .span2 {
        text-decoration: line-through;
        height: 8px;
        font-size: 10px;
        font-weight: 500;
        color: #999999;
        line-height: 18px;
      }
    }
    .ri {
      text-align: center;
      width: 82px;
      height: 30px;
      background: #16a1fc;
      border-radius: 15px;
      font-size: 13px;
      font-weight: 500;
      color: #ffffff;
      line-height: 30px;
    }
  }
}
</style>
